TMAP presents a graphical display of the fragmentation of the clusters on any disk. What's a Cluster? In the DOS world, disk space is allocated to files on an as- needed basis. The basic storage unit is called a cluster, and the size of a cluster varies by type of disk and by disk format. Typical floppy disks have cluster sizes of 1024 bytes, while on a hard disk a cluster may range from 2048 to 16384 bytes depending on the capacity of the disk. There are tens of thousands of clusters (allocation units) on a hard disk; the FORMAT command determines these sizes. The clusters are numbered and a file consists of one or more clusters. A directory entry is little more than a file's name, date, time and the disk's file allocation table (FAT) entry that represents the first cluster of the file's contents. The ordered list of actual cluster numbers for the file are coded in the FAT. This tells the sequence in which the clusters must be read or written so the individual pieces of the file get accessed in the right order. What's Fragmentation? Fragmentation is the natural consequence of creating and deleting files on most file systems. Since a file is made up of one or more clusters whose order is known, a file may be spread out all over the disk. Reading and writing the file is easy as DOS just follows the chain in the FAT. But jumping all over the disk, reading and writing bits and pieces, slows things down. In addition, if the pieces of a file are not together, we say the file is fragmented, and it can be extremely difficult to unerase or to recover it if destroyed, deleted or lost somehow. TMAP merely shows the relative level of fragmentation of all the files on the disk. Since there are only 1560 display positions on TMAP's display, we make each position represent more than one cluster. The symbol displayed is therefore a composite of those adjacent clusters grouped together. The scale, or the number of clusters represented by each symbol, is notated above the map. The idea for TMAP came from a utility program called VMAP from Golden Bow Systems of San Diego. According to a representative of Golden Bow, VMAP and its mainstream disk de-fragmenter product, VOPT, were distributed together as demos (the VOPT demo went through the actions but didn't actually change the disk). They ended up on bulletin boards around the country. When VMAP was written (1987 timeframe), hard disks were relatively small. An earlier version of VMAP didn't work on disk partitions larger than 32 megabytes. A subsequent version only worked properly on partitions smaller than 128 Mb. The reason? The size of the disk's file allocation table (FAT) changes as disk partitions get larger. On the version I used, VMAP assumed it could read the FAT as a single 64k block. However, on disks larger than 128 Mb, the FAT size exceeded 64k and VMAP did not work right. So, Now What? Every user of DOS should have a utility program that does maintenance on his own hard disk. Besides frequently running CHKDSK to ensure consistency in the file system, Golden Bow's VOPT utility does a stellar job of defragmenting; I highly recommend it. Norton's Speed Disk works great too. Personally I like ORG, a shareware disk organizer written by Grev‚ and Rifkind. A defragmenter comes with DOS 6. This program was authored by Ronald E. Raikes out of our mutual desire to have a "VMAP" that worked with our large disks. Ron wanted it to be a character-based utility that would function over his serial port. With his permission, I have modified his character-based version, changing the output format, adding color and doing additional testing on other hardware and DOS versions using Borland C++. It looks very much like the old VMAP from Golden Bow. I've tested TMAP with a wide range of types and sizes of floppy and hard disks (ESDI, IDE, etc) on a variety of machines and display adapters. It executes under DOS 4.01 and above, including DOS 6.0 and Novell DOS 7 (Beta 4). I have not tried it on a Doublespaced volume. The day prior to the day I planned to upload TMAP, a friend gave me a version of VMAP that I didn't even know existed. Voila, here was the version I had wanted all along! I'm pleased to report we get the same display... Thomas M. Allen North Orange County Computer Club (NOCCC), Orange CA 72537.1134@compuserve.com 13 December 1993